function callValidateYearLeap(p_year) {
	if((p_year%4 == 0 && p_year%100 != 0) || p_year%400 == 0)
		return 29;
	else
		return 28;
}
function callValidateMonth(p_date) {
	if(p_date[1] == 2)
		return callValidateYearLeap(p_date[2]);
	else if(p_date[1] == 1 || p_date[1] == 3 || p_date[1] == 5 || p_date[1] == 7 || p_date[1] == 8 || p_date[1] == 10 || p_date[1] == 12)
		return 31;
	else
		return 30; 
}
function callValidateGroupDate(p_date_in, p_date_out, p_length) {
	
	var v_group_date = new Array(); 
	
	while(true) {
			
		v_group_date.push(callValidateFormatDay(parseInt(p_date_in[0])) + '/' + p_date_in[1] + '/' + p_date_in[2]);			
		
		if(p_date_in[0] == p_date_out[0] && p_date_in[1] == p_date_out[1] && p_date_in[2] == p_date_out[2]) {
			break;
		} 
		if(p_date_in[0] < p_length) {
			p_date_in[0]++; 
		} else {
			p_date_in[0] = 0;
			p_date_in[0]++;
			p_date_in[1]++;
			p_length = callValidateMonth(p_date_in);
			if(p_date_in[1] > 12) {
				p_date_in[2]++;
				p_date_in[1] = 1;
			}
		}	
	}
	
	return v_group_date;
}
function callValidateFormatDay(p_day) {
	var v_day_format = '';
	if(p_day <= 9)
		v_day_format = '0' + p_day;
	else
		v_day_format = p_day;
	return v_day_format;
}
function callValidateEnter(p_evt) {
	var evt = (p_evt) ? p_evt : ((event) ? event : null);
	var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
	if ((evt.keyCode == 13) && (node.type=="text")) {
		return false;
   	}	
}
document.onkeypress = callValidateEnter;